package registnet.records;

import java.util.List;
import java.util.Vector;

public abstract class AbstractCourse implements ICourse {

	protected String courseCode;
	protected String courseName;
	protected int unit;
	protected int semester;
	protected int year;
	protected List<IPrerequisite> prerequisites = new Vector<IPrerequisite>();
	protected Department department;
	
	
	/**
	 * Gets the code assigned to the course
	 * 
	 * @return The code assigned to the course
	 */
	public String getCourseCode() {
		return courseCode;
	}
	
	
	/**
	 * Sets the code assigned to the course
	 * 	
	 * @param courseCode - The code assigned to the course
	 */
	public void setCourseCode(String courseCode) {
		this.courseCode = courseCode;
	}
	
	
	/**
	 * Gets the name of the course
	 * 
	 * @return 	The name of the course
	 */
	public String getCourseName() {
		return courseName;
	}
	
	
	/**
	 * Sets the name of the course
	 * 
	 * @param courseName - The name of the course
	 */
	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}
	
	
	/**
	 * Gets the number of units that can be earned for taking the course
	 * 
	 * @return 	The number of units that can be earned for taking the course
	 */
	public int getUnit() {
		return unit;
	}
	
	
	/**
	 * Sets the number of units that can be earned for taking the course
	 * 
	 * @param unit - The number of units that can be earned for taking the course
	 */
	public void setUnit(int unit) {
		this.unit = unit;
	}
	
	
	/**
	 * Gets the semester when the course should be taken
	 * 
	 * @return 	The semester when the course should be taken
	 */
	public int getSemester() {
		return semester;
	}


	/**
	 * Sets the semester when the course should be taken
	 * 
	 * @param semester - The semester when the course should be taken
	 */
	public void setSemester(int semester) {
		this.semester = semester;
	}


	/**
	 * Gets the year level when the course should be taken
	 * 
	 * @return 	The year level when the course should be taken
	 */
	public int getYear() {
		return year;
	}


	/**
	 * Sets the year level when the course should be taken
	 * 
	 * @param year - The year level when the course should be taken
	 */
	public void setYear(int year) {
		this.year = year;
	}
	
	
	/**
	 * Gets the list of prerequisites of the course
	 * 
	 * @return 	The list of prerequisites of the course
	 */
	public List<IPrerequisite> getPrerequisites() {
		return prerequisites;
	}
	
	
	/**
	 * Sets the list of prerequisites of the course
	 * 
	 * @param prerequisites - The list of prerequisites of the course
	 */
	public void setPrerequisites(List<IPrerequisite> prerequisites){
		this.prerequisites = prerequisites;
	}
	
	
	/**
	 * Adds a prerequisite of the course
	 * 
	 * @param prerequisites - The list of prerequisites of the course
	 */
	public void addPrerequisite(IPrerequisite prerequisite) {
		this.prerequisites.add(prerequisite);
	}
	
	
	/**
	 * Gets the department that offers the course
	 * 
	 * @return 	The department that offers the course
	 */
	public Department getDepartment() {
		return department;
	}
	
	
	/**
	 * Sets the department that offers the course
	 * 
	 * @param department - The department that offers the course
	 */
	public void setDepartment(Department department) {
		this.department = department;
	}
	
}
